1. Field of the Invention
The present invention relates to a disk drive having a buffer control function.
2. Related Art of the Invention
In recent years, the downsizing of hard disk drives (HDD) has greatly progressed and small-sized hard disk drives have been extensively used as external memories for small sized computers including personal computers. In addition, a hard disk controller (HDC) provided with an interface which is used for small systems as the standard equipment has been supplied as a large scale integrated circuit device. This HDC can be built in a hard disk drive (HDD) for a small computer as it is easy to incorporate the HDC in such a system.
When data are transferred between the hard disk controller and a host computer, it is executed in the byte or word mode. However, in the write/read of data to/from a disk, bit serial data is intrinsically read/written. In this case, there exists such a problem that there is a different time restriction between the recording/reproducing operation on the disk recording surface and the data transfer operation between a host computer and an HDD. Therefore, these operations cannot be synchronized completely to each other. For this reason, it becomes necessary to provide a data buffer to store data temporarily. Now it has become a general tendency to equip hard disk drives containing hard disk controllers with a buffer memory in relatively large capacity to give a read ahead function, cache memory function, etc. to the buffer control in order to promote data transfer efficiency and performance. In general, a microcontroller is used in hard disk drives for system control including a hard disk controller. The high level control of the advance reading function and cache memory control described above has become possible using this built-in microcontroller.
This microcontroller is composed of a large scaled integrated circuit (LSI) with a program memory, a data memory, input/output units, a clock generator, etc. integrated on a single substrate.
On the other hand, with a large capacity and high speed transfer resulting from increased recording density coupled with a realization of the high density of semiconductor memory circuits, it has become possible to equip a highly efficient cache memory of balanced cost and performance to a hard disk drive relatively easily and also, it has been strongly demanded.
A data hit judgment (a so-called hit judgment) has been used to judge whether data existing in the buffer memory has the same address on the disk as that of data being accessed, and a replacement algorithm is used as a replacement rule governing replacement of data in a buffer memory having been realized by the built-in microcontroller.
Because of the above, if a buffer memory has been improved to a highly efficient level, such a problem will come out that a relatively large time may be required for these processes and an overhead time of the microcontroller may become long, correspondingly. Therefore, it may become necessary to take measures, for instance, to use a highly efficient microcontroller and a high speed program memory or to improve performance using a plurality of microcontrollers or to adjust functions corresponding to the processing capacity.
The overhead time referred to here is a time from when the microcontroller receives a command from a host computer to when the magnetic head actually begins to move.